﻿using System;
using System.Windows.Controls;
using vsXPathTester.Lib;

namespace vsXPathTester.Controls
{
    /// <summary>
    /// Interaction logic for MainInterface.xaml
    /// </summary>
    public partial class MainInterface : UserControl, ITabbedWindow
    {
        public MainInterface()
        {
            InitializeComponent();
            this.TabName = "MainInterface";
            this.TabTitle = "Home";
            this.IsAllowRefresh = false;
        }

        #region Inteface Implementation

        public event CloseTab CloseInitiated;

        public event ReloadTabData Reload;

        public string TabName { get; set; }

        public string TabTitle { get; set; }

        public bool IsAllowRefresh { get; set; }

        public void ReloadData()
        {
            //Do nothing            
            if (this.Reload != null)
            {
                this.Reload(this, new EventArgs());
            }
        }

        #endregion
    }
}
